/**
  ******************************************************************************
  * @file    PmsmParamDefault.c
  * @author  Silan - MC Team
  * @version 1.0.0
  * @date    2017/07/19
  * @brief   PMSM Driver Parameter Default Value Set.
  * @details None
  * @note    None
  ******************************************************************************
  * @attention
  * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
  * AS A RESULT, SILAN MICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
  * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
  * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
  * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  ******************************************************************************
  * Change History
  * -# 2017/07/19 | v1.0.0 | Wangjianlong | Creat file.
  *
  *
  *
  *
  *
  *
  *
  *
  *
  ******************************************************************************
  */

/********************************************************************************
 * Include section
 *******************************************************************************/
#include "PmsmDrvParam.h"
#include "PmsmParamDefault.h"


/*******************************************************************************
 * Global function for the current project
 ******************************************************************************/

/**
  * @brief  Set default value of struct PMSM_DRV_PARAM_s.
  */
void PmsmDrvParamDefault(struct PMSM_DRV_PARAM_s *ptr){
  ptr->u16PwmFreq                       =     DEFAULT_PMSM_PwmFreq;
  ptr->fPwmDtUS                         =     DEFAULT_PMSM_PwmDtUS;
  ptr->fSmpDelay                        =     DEFAULT_PMSM_SmpDelay;
  ptr->u8PolePairs                      =     DEFAULT_PMSM_PolePairs;
  ptr->fRs                              =     DEFAULT_PMSM_Rs;
  ptr->fLd                              =     DEFAULT_PMSM_Ld;
  ptr->fLq                              =     DEFAULT_PMSM_Lq;
  ptr->fJ                               =     DEFAULT_PMSM_J;
  ptr->fFlux                            =     DEFAULT_PMSM_Flux;
  ptr->u8BaseFreqMec                    =     DEFAULT_PMSM_BaseFreqMec;
  ptr->fBaseCurr                        =     DEFAULT_PMSM_BaseCurr;
  ptr->u16BaseVolt                      =     DEFAULT_PMSM_BaseVolt;
  ptr->u8OverModeEn                     =     DEFAULT_PMSM_OverModeEn;
  ptr->u8SingleShuntEn                  =     DEFAULT_PMSM_SingleShuntEn;
  ptr->fDampedCoeff4SpdPI               =     DEFAULT_PMSM_DampedCoeff4SpdPI;
  ptr->fBandWidth4SpdPI                 =     DEFAULT_PMSM_BandWidth4SpdPI;
  ptr->fDampedCoeff4SpdComp             =     DEFAULT_PMSM_DampedCoeff4SpdComp;
  ptr->fBandWidth4SpdComp               =     DEFAULT_PMSM_BandWidth4SpdComp;
  ptr->u16BandWidth4CurrPI              =     DEFAULT_PMSM_BandWidth4CurrPI;
  ptr->fDampedCoeff4PllPI               =     DEFAULT_PMSM_DampedCoeff4PllPI;
  ptr->u8BandWidth4PllPI                =     DEFAULT_PMSM_BandWidth4PllPI;
  ptr->u8FilterCoeff4Spd                =     DEFAULT_PMSM_FilterCoeff4Spd;
  ptr->u8Kp4WF                          =     DEFAULT_PMSM_Kp4WF;
  ptr->u8Ki4WF                          =     DEFAULT_PMSM_Ki4WF;
  ptr->u8SpdVal4MTPA                    =     DEFAULT_PMSM_SpdVal4MTPA;
  ptr->u8TorqueCompFreq                 =     DEFAULT_PMSM_TorqueCompFreq;
  ptr->fTorqueCompPeakCurr              =     DEFAULT_PMSM_TorqueCompPeakCurr;
  ptr->fFieldWeekPoint                  =     DEFAULT_PMSM_FieldWeekPoint;
  ptr->fFieldWeekLimitId                =     DEFAULT_PMSM_FieldWeekLimitId;
  ptr->u8ResonancePointVal              =     DEFAULT_PMSM_ResonancePointVal;
  ptr->u8AntiResonanceBandWidth         =     DEFAULT_PMSM_AntiResonanceBandWidth;
  ptr->u8ResonancePointVal1             =     DEFAULT_PMSM_ResonancePointVal1;
  ptr->u8AntiResonanceBandWidth1        =     DEFAULT_PMSM_AntiResonanceBandWidth1;
  ptr->fAccRampVal                      =     DEFAULT_PMSM_AccRampVal;
  ptr->fDecRampVal                      =     DEFAULT_PMSM_DecRampVal;
  ptr->fMaxSpeedPU                      =     DEFAULT_PMSM_MaxSpeedPU;
  ptr->fMinSpeedPU                      =     DEFAULT_PMSM_MinSpeedPU;
  ptr->fOCVal4RMS                       =     DEFAULT_PMSM_OCVal4RMS;
  ptr->u8OCVal4Peak                     =     DEFAULT_PMSM_OCVal4Peak;
  ptr->u8Omega4PhaseLost                =     DEFAULT_PMSM_Omega4PhaseLost;
  ptr->fCurr4PhaseLack                  =     DEFAULT_PMSM_Curr4PhaseLack;
  ptr->fMaxIsVal                        =     DEFAULT_PMSM_MaxIsVal;
  ptr->fStartupCurr                     =     DEFAULT_PMSM_StartupCurr;
  ptr->u8StartupOmega                   =     DEFAULT_PMSM_StartupOmega;
  ptr->u8StartupRmpAcc                  =     DEFAULT_PMSM_StartupRmpAcc;
  ptr->u8RateCurr                       =     DEFAULT_PMSM_RateCurr;
  ptr->u8Curr1                          =     DEFAULT_PMSM_Curr1;
  ptr->u8Curr2                          =     DEFAULT_PMSM_Curr2;
  ptr->fLdPercent1                      =     DEFAULT_PMSM_LdPercent1;
  ptr->fLqPercent1                      =     DEFAULT_PMSM_LqPercent1;
  ptr->fLdPercent2                      =     DEFAULT_PMSM_LdPercent2;
  ptr->fLqPercent2                      =     DEFAULT_PMSM_LqPercent2;
  ptr->fStartupHeatCurrPU               =     DEFAULT_PMSM_StartupHeatCurrPU;
  ptr->u8ChkOmega                       =     DEFAULT_PMSM_ChkOmega;
  ptr->u8ChkVolt                        =     DEFAULT_PMSM_ChkVolt;
  ptr->fMinPulse                        =     DEFAULT_PMSM_MinPulse;
}

/*---------------------------------- End of the file ---------------------------------*/

